/*
Theme created for use with Sequence.js (http://www.sequencejs.com/)

Theme: Modern Slide In
Version: 1.3
Theme Author: Ian Lunn @IanLunn
Author URL: http://www.ianlunn.co.uk/
Theme URL: http://www.sequencejs.com/themes/modern-slide-in/

This is a FREE theme and is available under a MIT License:
http://www.opensource.org/licenses/mit-license.php

Sequence.js and its dependencies are (c) Ian Lunn Design 2012 - 2013 unless otherwise stated.
*/

//Selector Variables
$sequenceContainer: "#sequence";
$sequenceCanvas: ".sequence-canvas";
$animateIn: ".animate-in";
$animateOut: ".animate-out";
$nextButton: ".sequence-next";
$prevButton: ".sequence-prev";
$pauseButton: ".sequence-pause";
$pagination: ".sequence-pagination";
$whenPaused: ".sequence-paused";
$sequencePreloader: ".sequence-preloader";

@import "partials/reset"; //import Eric Meyer's CSS Reset. Remove this if you have a reset in your main stylesheet
@import "partials/mixins"; //vendor prefixing mixins

/* THEME STYLES */

.sequence-theme { /* this container is just to ensure the background color stretches all the way across on bigger screens */
	background: #D9D9D9; 
}

#{$sequenceContainer} {
	margin: 0 auto;
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 1280px;

	background-color: #D9D9D9;
	background-image: url("../images/bg-sequence.jpg");
	background-repeat: no-repeat;
	background-position: 50% 100%;

	color: white;
	font-size: 0.625em;
	margin: 0 auto;
	position: relative;
	height: 600px;

	> #{$sequenceCanvas} {
		height: 100%;
		width: 100%;

		 > li {
			position: absolute;
			width: 100%;
			height: 100%;
			z-index: 1;
			top: -50%;

			img {
				height: 96%;
			}
		}

		li > * {
			position: absolute;
			$transitionProperties: left, opacity; /* only cause the left and opacity properties to transition */
			@include prefixed(transition-property, #{$transitionProperties});
		}
	}
}

#{$nextButton},
#{$prevButton} {
	color: white;
	cursor: pointer;
	display: none;
	font-weight: bold;
	padding: 10px 15px;
	position: absolute;
	top: 50%;
	z-index: 1000;
	height: 75px;
	margin-top: -47.5px;
}

#{$pauseButton} {
	bottom: 0;
	cursor: pointer;
	position: absolute;
	z-index: 1000;
}

#{$whenPaused} {
	opacity: 0.3;
}

#{$prevButton} {
	left: 3%;
}

#{$nextButton} {
	right: 3%;
}

#{$prevButton} img, 
#{$nextButton} img {
	height: 100%;
	width: auto;
}

#sequence-preloader {
	background: #d9d9d9;
}

#{$pagination} {
	bottom: 1%;
	display: none;
	right: 6%;
	position: absolute;
	z-index: 10;
	@include prefixed(transition-duration, .5s);

	li {
		display: inline-block;
		*display: inline; /* Hack for IE7 and below as they don't support inline-block */ 
		height: 140px;

		img {
			cursor: pointer;
			opacity: 0.5;
			@include prefixed(transition-duration, 1s);
			$transitionProperties: margin-bottom, opacity;
			@include prefixed(transition-property, #{$transitionProperties});
		}
		
		img:hover {
			margin-bottom: 4px;
			@include prefixed(transition-duration, .3s);
		}
	}

	li.current img {
		opacity: 1;
	}
}

h2 {
	color: white;
	font-family: 'Sirin Stencil', serif;
	font-weight: bold;
	text-transform: uppercase;
}

h3 {
	font-family: 'Ruluko', serif;
}

#{$nextButton},
#{$prevButton} {
	position: absolute;
	opacity: 0.6;
	@include prefixed(transition-duration, 1s);
}

#{$nextButton}:hover,
#{$prevButton}:hover {
	opacity: 1;
	@include prefixed(transition-duration, 1s);
}

.title {
	font-size: 3.4em;
	left: 65%;
	width: 35%;
	opacity: 0;
	bottom: 1%;
	z-index: 50;
}

#{$animateIn} .title {
	left: 50%;
	opacity: 1;
	@include prefixed(transition-duration, .5s);
}

#{$animateOut} .title {
	left: 35%;
	opacity: 0;
	@include prefixed(transition-duration, .5s);
}

.subtitle {
	color: black;
	font-size: 2em;
	left: 35%;
	width: 35%;
	opacity: 0;
	top: 101%;
}

#{$animateIn} .subtitle {
	left: 50%;
	opacity: 1;
	@include prefixed(transition-duration, .5s);
}

#{$animateOut} .subtitle {
	left: 65%;
	opacity: 0;
	@include prefixed(transition-duration, .5s);
}

.model {
	left: 30%;
	bottom: -48%;
	opacity: 0;
	position: relative;
	height: auto !important;
	max-height: 568px !important;
	width: 30%;
	min-width: 225px; /* prevents the model from shrinking when the browser is resized */
	max-width: 266px;
}

#{$animateIn} .model {
	left: 15%;
	opacity: 1;
	@include prefixed(transition-duration, 1s);
}

#{$animateOut} .model {
	left: 15%;
	opacity: 0;
	@include prefixed(transition-duration, .5s);
}

@media only screen and (min-width : 992px) {
	#{$sequenceContainer} {
		.title {
			width: 42%;
		}
	}
}

@media only screen and (max-width : 838px) {
	#{$sequenceContainer} {
		height: 550px;
	
		.model {
			max-height: 530px !important;
			width: auto;
		}
	}
}

@media only screen and (max-width : 768px) {
	#{$sequenceContainer} {
		height: 500px;
	
		.title {
			font-size: 2.8em;
		}
		
		.subtitle {
			font-size: 1.6em;
		}
		
		#{$nextButton},
		#{$prevButton} {
			height: 60px;
			margin-top: -40px;
		}
		
		.model {
			max-height: 480px !important;
			width: auto;
		}
	}
}

@media only screen and (max-width : 568px) {
	#{$sequenceContainer} {
		.model {
			left: 50%;
			min-width: 40%; /*prevents the model from shrinking when the browser is resized*/
			width: 40%;
		}
		
		#{$animateIn} .model {
			left: 50%;
			margin-left: -20%;
		}
		
		#{$animateOut} .model {
			left: 50%;
			margin-left: -20%;
		}
		
		.title {
			background: #a1a1a1;
			background: rgba(0,0,0,0.3);
			bottom: 0;
			left: 100%;
			padding: 4%;
			bottom: -50%;
			width: 100%;
			z-index: 10;
		}
		
		#{$animateIn} .title {
			left: 0%;
		}
		
		#{$animateOut} .title {
			left: -100%;	
		}
		
		.subtitle {
			visibility: hidden;
		}
		
		#{$pagination} {
			bottom: 40px;

			li img {
				height: 100px;
			}
		}
	}
}

@media only screen and (max-width : 518px) {
	#{$sequenceContainer} {
		height: 450px;
	}
}

@media only screen and (max-width : 468px) {
	#{$sequenceContainer} {
		height: 415px;
	
		#{$pagination} {
			opacity: 0;
			visibility: hidden;
		}
	}
}

@media only screen and (max-width : 418px) {
	#{$sequenceContainer} {
		height: 375px;
	}
}

@media only screen and (max-width : 368px) {
	#{$sequenceContainer} {
		height: 325px;
		
		.title {
			font-size: 2.2em;
		}
	}
}

@media 	only screen
	and (max-width : 320px)
	and (orientation : portrait) { /*iphone portrait*/
	#{$sequenceContainer} {
		height: 320px;
	
		.model {
			min-width: 45%;
			width: 45%;
		}
		
		#{$animateIn} .model {
			margin-left: -22.5%;
		}
		
		#{$animateOut} .model {
			margin-left: -22.5%;
		}
	}
}

@media 	only screen
	and (min-width : 321px)
	and (max-width : 480px)
	and (orientation : landscape) {
	#{$sequenceContainer} {
		height: 260px;
	
		.model {
			min-width: 24%;
			width: 24%;
		}
		
		#{$animateIn} .model {
			left: 17.5%;
			margin-left: 0;
		}
		
		#{$animateOut} .model {
			left: 17.5%;
			margin-left: 0;
		}
		
		#{$pagination} {
			right: 17.5%;
		}
	}
}